From: André Spiegel Date: Wed, 7 Jan 1998 14:33:37 +0000 (+0000) Subject: (vc-resynch-window): Behave properly when view-read-only is non-nil. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~78474 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=f8791ebe79e49f11c378e5ec868a070043f0a224;p=emacs.git (vc-resynch-window): Behave properly when view-read-only is non-nil. --- diff --git a/lisp/vc.el b/lisp/vc.el index a49092e79e2..a5f0295e14f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -990,6 +990,14 @@ merge in the changes into your working copy." (remove-hook 'find-file-hooks 'vc-find-file-hook) (vc-revert-buffer1 t noquery) (add-hook 'find-file-hooks 'vc-find-file-hook) + (and view-read-only + (if (file-writable-p file) + (and view-mode + (let ((view-old-buffer-read-only nil)) + (view-mode-exit))) + (and (not view-mode) + (not (eq (get major-mode 'mode-class) 'special)) + (view-mode-enter)))) (vc-mode-line buffer-file-name)) (kill-buffer (current-buffer)))))